<template>
  <div class="box">
    <div v-for="item in records" :key="item.id" class="box-1">
      <div class="app">
        <div class="app-1">
          <h3>{{ item.title }}</h3>
          <span>{{ item.createTime }}</span>
        </div>
        <p>发布人：{{ item.sourceName }}</p>
      </div>
      <ul>
        <li>{{ item.msgDate }}</li>
      </ul>
    </div>
  </div>

  <!-- 

0: {id: 6913, type: 2, msgDate: "现在是在做企业项目,一切的辛苦付出,都是为了以后更好的就业,可以走的更远,以后可以过的更好,为了美好的明天,好好加油!!!",…}
belongUser: "1354275382904549377"
createTime: "2021-02-05"
id: 6913
isReader: 0
msgDate: "现在是在做企业项目,一切的辛苦付出,都是为了以后更好的就业,可以走的更远,以后可以过的更好,为了美好的明天,好好加油!!!"
sendName: "大宝剑"
sourceName: "孔靖乐"
title: "个人消息"
top: 1
type: 2

     -->
</template>

<script>
import { messagetypeData } from "../request/api";
export default {
  data() {
    return {
      id: this.$route.query.id,
      records: [],
    };
  },
  created() {
    messagetypeData({ id: this.id }).then((res) => {
      console.log(res.data.records);
      this.records = res.data.records;
    });
  },
};
</script>
 
<style lang = "less" scoped>
* {
  margin: 0;
  padding: 0;
  list-style: none;
}
.box {
  padding: 15px;
  .box-1 {
    margin-bottom: 10px;
    .app {
      /* background-color: #ccc; */
      line-height: 35px;
      .app-1 {
        display: flex;
        justify-content: space-between;
      }
    }
    ul {
      line-height: 35px;
    }
  }
}
</style>